class Calculator {
    private double num1;
    private double num2;

    public double getNum1() {
        return num1;
    }

    public void setNum1(double num1) {
        this.num1 = num1;
    }

    public double getNum2() {
        return num2;
    }

    public void setNum2(double num2) {
        this.num2 = num2;
    }

    public double Add() {
        return this.num1 + this.num2;
    }

    public double Sub() {
        return this.num1 - this.num2;
    }

    public double Mul() {
        return this.num1 * this.num2;
    }

    public double Dev() {
        return this.num1 / this.num2;
    }
}


public class TestDemo2 {
    public static void main(String[] args) {
        Calculator cal1 = new Calculator();
        cal1.setNum1(10.0);
        cal1.setNum2(20.0);
        System.out.println(" 加法： " + cal1.Add());
        System.out.println(" 减法： " + cal1.Sub());
        System.out.println(" 乘法： " + cal1.Mul());
        System.out.println(" 除法： " + cal1.Dev());
    }
}
